void main()
{
  float m = 0;
  float M = 0;
  scanf("%f",&m);
  if (m>5000)
  {
   M = m-(m-5000)*0.05;
    printf("%f\n",M);
  }
  else
  {
    M=m;
	printf("%.2f\n",M);
  }
}
